package com.asj.vivo.lock.config;

import com.rabbitmq.client.ConnectionFactory;

 //MQ功能类
public class RabbitMQHelper {

    //队列名称
    public static String QUEUE_NAME = "androidMdmExchange";
    //MQ地址
    public static final String HOST = "8.138.118.216";
//    public static final String HOST = "8.138.42.163 ";
    public static final int PORT  = 5672;
    //账号
    public static final String USERNAME = "aisheji";
    //密码
    public static final String PASSWORD = "Gy5998028";

     public ConnectionFactory getConnectionFactory() {
         ConnectionFactory factory = new ConnectionFactory();
         factory.setHost(HOST);
         factory.setPort(PORT);
         factory.setUsername(USERNAME);
         factory.setPassword(PASSWORD);
         factory.setRequestedHeartbeat(60);
         factory.setAutomaticRecoveryEnabled(true);

         return factory;
     }
}
